From: Colin Walters Date: Tue, 29 Nov 2016 03:03:24 +0000 (-0500) Subject: [ASAN] set-origin: Squash a leak X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~42^2~29 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=667b734c792a50ca5b257e9ecbc270ba7e65a814;p=ostree.git [ASAN] set-origin: Squash a leak Just a minor leak in the commandline. Closes: #598 Approved by: jlebon --- diff --git a/src/ostree/ot-admin-builtin-set-origin.c b/src/ostree/ot-admin-builtin-set-origin.c index 0e79ab5e..2b6866cc 100644 --- a/src/ostree/ot-admin-builtin-set-origin.c +++ b/src/ostree/ot-admin-builtin-set-origin.c @@ -50,7 +50,7 @@ ot_admin_builtin_set_origin (int argc, char **argv, GCancellable *cancellable, G const char *branch = NULL; glnx_unref_object OstreeRepo *repo = NULL; glnx_unref_object OstreeSysroot *sysroot = NULL; - OstreeDeployment *target_deployment = NULL; + glnx_unref_object OstreeDeployment *target_deployment = NULL; context = g_option_context_new ("REMOTENAME URL [BRANCH]"); @@ -85,6 +85,8 @@ ot_admin_builtin_set_origin (int argc, char **argv, GCancellable *cancellable, G "Not currently booted into an OSTree system"); goto out; } + /* To match the below */ + target_deployment = g_object_ref (target_deployment); } else {